package com.ktvme.core;

import com.ktvme.process.ProcessOperator;
import com.ktvme.processInstance.ProcessInstanceOperator;
import com.ktvme.project.ProjectOperator;
import com.ktvme.taskInstance.TaskInstanceOperator;
import lombok.Data;

@Data
public class DolphinClient {
    private String url;
    private String token;
    private ProcessOperator processOperator;
    private ProcessInstanceOperator processInstanceOperator;
    private ProjectOperator projectOperator;
    private TaskInstanceOperator taskInstanceOperator;

    public DolphinClient(String url, String token) {
        this.url = url;
        this.token = token;
        this.initOperators();
    }

    public void initOperators() {
        this.processOperator = new ProcessOperator(url, token);
        this.processInstanceOperator = new ProcessInstanceOperator(url, token);
        this.projectOperator = new ProjectOperator(url, token);
        this.taskInstanceOperator = new TaskInstanceOperator(url, token);
    }


}
